<?php 

include '../../function.php';
//var_dump($_GET);

if ($_GET) {
//$db = file_get_contents('./db.php');
	$db = include './db.php';
	
	unset($db[$_GET['id']]);	
	// var_dump($db);
	$newDb = var_export($db, true);
	$newDb = "<?php return $newDb ?>";
	file_put_contents('./db.php', $newDb);
	$message = "删除成功";

	include './tpl/success.html';
}else {
	$error = "删除失败";
 	include './tpl/error.html';
}


	 







 ?>